package com.xc.c1

object T1 {

  def main(args: Array[String]): Unit = {
    print("main\thello\tscala\n")
    printf("name = %s,age = %f,height = %.2f\n", "hxc", 18.3311, 1.8771)
    var name: String = "hxc"
    println(s"my name is $name")
    var age: Int = 18;

    println(s"my name is $name , age is ${age + 10}")

    //    isInstanceOf
    var num = 10;
    println("num instance of Int : " + num.isInstanceOf[Int])

    println("----------------------")
    val v = 1
    println(v.toString + v.toDouble + 1.toString + "-" + true.toString)

    val d = 5.12e2
    println("e :" + d)
    println(d.isInstanceOf[Double])
    val x = 512
    println("int :" + x.isInstanceOf[Int])

    println("------------------")
    println("'a'+1 = " + 'a' + 1)
    var m: Int = 'c' + 1
    println("m:Int = " + m)
  }

}
